/*package com.yuyu.demo.demo_springboot.config;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.alibaba.druid.support.http.StatViewServlet;
import com.alibaba.druid.support.http.WebStatFilter;

*//**
 * 阿里巴巴数据源配置项,开启监控模式，使用spring-boot模式已经开启了
 * 这个可以作为一个通用的注入bean的样例
 * springboot提供了
	ServletRegistrationBean,FilterRegistrationBean,ServletListenerRegistrationBean三个类来注入servlet,filter,listener
 * @author iv1733
 * 访问地址：http://localhost/druid/login.html
 *
 *//*
@Configuration
public class DruidConfig {
	*//**
     * druid监控
     * @return
     *//*
    @Bean
    public ServletRegistrationBean druidServlet() {
        ServletRegistrationBean reg = new ServletRegistrationBean();
        reg.setServlet(new StatViewServlet());
        reg.addUrlMappings("/druid/*");
        //reg.addInitParameter("allow", "127.0.0.1");
        //reg.addInitParameter("deny","");
        reg.addInitParameter("loginUsername", "yuyu");
        reg.addInitParameter("loginPassword", "123456");
        return reg;
    }

    *//**
     * druid监控过滤
     * @return
     *//*
    @Bean
    public FilterRegistrationBean filterRegistrationBean() {
        FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
        filterRegistrationBean.setFilter(new WebStatFilter());
        filterRegistrationBean.addUrlPatterns("/*");
        filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*");
        return filterRegistrationBean;
    }
}
*/